package cn.springcloud.fix.server.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@EnableScheduling
public class ScheduledTasks {

    // @Autowired
    // private BusSender busSender;

    @Scheduled(fixedRate = 20000)
    public void sendMessageToRedis() {
        log.info("Send Hello To Redis With chat");
    }

    @Scheduled(fixedRate = 30000)
    public void sendMessageToMq() {
        log.info("Send Hello To RabbitMQ With mq");
        // busSender.send("mq", "Hello To RabbitMQ!");
    }
}